PreviousNextTracker indexSee it online !

(201/218) 501 - Auto-save untitled buffers

Hi,

I'm missing a feature from Notepad++/SublimeText that I find very useful. In those editors when you create a new buffer, enter text but do not save to file, when you exit the editor the buffer is saved automatically somewhere, and when you open the editor again, it is automatically reloaded.

This is incredibly useful for "persistent scratch buffers".

Is this something that jEdit already supports (5.2) and I just can't find it, or is it a feature that could be added?

Maarten

Submitted boekhold - 2015-08-12 08:28:16.302000 Assigned
Priority 5 Labels
Status open Group none
Resolution None

Comments

2015-09-06 09:59:00.726000
boekhold

I'm willing to have a look at implementing this myself, but I could use some pointers to get started. I did some testing, and had an initial look at the source code:

* Currently auto-save is done in whatever directory the file browser is. That's a problem if you use remote filesystems. IMO auto-save (eg the #Untitled-1# files) should be located in a central 'autosave' directory on the local filesystem.
* On exit of jEdit, it asks if you want to save the untitled buffers. There's no way to tell it "no, I don't want to save as real file but keep the autosave file".

Both of these should be easy to solve, but probably requires some discussion as it would change the existing behavior of jEdit.

2017-02-17 17:36:50.113000
roti

patch #596 create for this
https://sourceforge.net/p/jedit/patches/596/